//this has been a fake Group Mamanger for testing
using System.Diagnostics;
using dnneurope.portalgroups.contract;

namespace dnneurope.portalgroups.logic
{
    public class FakePortalGroupManager : IManagePortalGroups
    {
        public PortalGroupModel Get()
        {
            var model = new PortalGroupModel
                {
                    PortalGroups = new[]
                        {
                            new PortalGroupInfo()
                                {
                                    PortalGroupId = 1,
                                    MasterPortal = new PortalInfo{PortalId = 1, PortalName = "PortalOne"},
                                    PortalGroupName = "GroupOne",
                                    AuthenticationDomain ="Domain1",
                                    Portals = new PortalInfo[0]
                                },
                            new PortalGroupInfo()
                                {
                                    PortalGroupId = 2,
                                    MasterPortal = new PortalInfo{PortalId =2, PortalName = "PortalTwo"},
                                    PortalGroupName = "GroupTwo",
                                    AuthenticationDomain ="Domain2",
                                    Portals= new []
                                        {
                                            new PortalInfo{PortalId=5,PortalName="PortalFive"},
                                            new PortalInfo{PortalId=6,PortalName="PortalSix"},
                                        }
                                }
                        },
                    AvailablePortals = new[]
                        {
                            new PortalInfo{PortalId=3,PortalName="PortalThree"},
                            new PortalInfo{PortalId=4,PortalName="PortalFour"},
                        }
                };
            return model;
        }

        public int Save(PortalGroupInfo portalGroup)
        {
            Trace.TraceInformation("Save PortalGroup");
            return portalGroup.PortalGroupId;
        }

        public void Delete(int portalGroupId)
        {
            Trace.TraceInformation("Delete PortalGroup");
        }
    }
}